package com.nondo.dean.auth.provider.impl;

import com.nondo.dean.auth.provider.DeanPlatformClient;
import com.nondo.dean.common.web.View;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author nondo
 */
public class DeanPlatformClientFallbackFactory implements FallbackFactory<DeanPlatformClient> {

    private Logger log = LoggerFactory.getLogger(DeanPlatformClientFallbackFactory.class);

    @Override
    public DeanPlatformClient create(Throwable e) {

        log.warn(e.getMessage(), e);
        return (params) -> View.ofError("绑定接单员失败");

    }
}